package com.oig.sys.workflow.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 * 数据实体属性
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_data_module_detail")
@EntityListeners({AuditingEntityListener.class})
public class TbDataModuleDetail implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 * 实体对象id
	 */
	@Column(name = "data_module_id")
	private Integer dataModuleId;

	/**
	 * 列中文名称
	 */
	@Column(name = "column_name")
	private String columnName;

	/**
	 * 列名
	 */
	@Column(name = "column_col")
	private String columnCol;

	/**
	 * 列别名
	 */
	@Column(name = "column_field")
	private String columnField;

	/**
	 * 0-数值（浮点数+整数）1-整数  2-字符串 3-日期 4-日期时间 5-时间 6-枚举 当枚举时enum_value_json有值
	 */
	@Column(name = "column_value_type")
	private String columnValueType;

	/**
	 * 枚举名称
	 */
	@Column(name = "enum_value_json")
	private String enumValueJson;

	/**
	 * 0-文本 1-between  2-枚举下拉框 3-查询下拉框 4-弹框查询 5-树形下拉 =1时 取enum_value_json值 2~3默认支持多选
	 */
	@Column(name = "query_type")
	private String queryType;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;
}
